package 判断和循环;

//回文
//思路：把数字倒过来和原数字比较

import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个数");
        int x = sc.nextInt();
        int temp = x;
        int num = 0;

        while(x != 0){
            int ge = x % 10;
            x = x / 10;
            num = num * 10 + ge;
        }

        System.out.println(num);
        System.out.println(temp == num);
    }
}
